<div class="w100p filter">
      <div class="float_left p10l">
       <form id="grant-filter-form" action="" method="post">
        <div class="float_left m10r">
          <label  class="lbl1"><?php echo $this->translate->_("Choose Group");?>:</label>
          <select onchange="document.getElementById('grant-filter-form').submit();" class="txt" name="filter[GroupID]" style="height:20px;margin-bottom: -2px;width: 175px;">
          <?php foreach($this->groupList as $b){?>
               <option value="<?php echo $b['GroupID'];?>" <?php if($b['GroupID'] == $this->filter['GroupID']){?> selected<?php } ?>><?php echo $b['GroupName'];?></option>
          <?php }?>
          </select>
        </div>
        <div class="float_left">
           <label  class="lbl1"><?php echo $this->translate->_("Permission type");?>:</label>
           <select onchange="document.getElementById('grant-filter-form').submit();" class="txt" name="filter[PermissionType]" style="height:20px;margin-bottom: -2px;width: 175px;">
              <option value="*">-- <?php echo $this->translate->_("All");?> --</option>
          <?php foreach($this->PermissionTypeList as $b){?>
               <option value="<?php echo $b['PermissionType'];?>" <?php if($b['PermissionType'] == $this->typeFilter['PermissionType']){?> selected<?php } ?>><?php echo $b['PermissionType'];?></option>
          <?php }?>
          </select>
        </div>
        <div class="cl"></div>
       </form>
      </div>
      <div class="float_right">
        <div class="float_left button_leftb m10r">
          <div class="button_rightb"><a href="<?php echo $this->url(array("action" => "index")); ?>">
                   <?php echo $this->translate->_("Back to permission list");?>
                </a></div>
        </div>
        <div class="cl"></div>
      </div>
      <div class="cb"></div>
    </div>
    <div id="main">
      <div class="w950 mc bg_table po p15b">
        <div class="top_left"></div>
        <div class="top_right"></div>
        <div class="bottom_left"></div>
        <div class="bottom_right"></div>
        <h3 class="p15t p15l p15b bg_bot"><b><?php echo $this->translate->_("Grant Group Permissions");?></b></h3>
        <table cellpadding="0" cellspacing="0">
		<tr>
			<th width="15%" bgcolor="#bebebe"><?php echo $this->translate->_("Permission ID");?></th>
                        <th width="20%" bgcolor="#bebebe"><?php echo $this->translate->_("Name");?></th>
                        <th width="10%" bgcolor="#bebebe"><?php echo $this->translate->_("Type");?></th>
                        <th width="20%" bgcolor="#bebebe"><?php echo $this->translate->_("Description");?></th>
			<th width="20%" bgcolor="#bebebe"><?php echo $this->translate->_("Permission Key");?></th>
			<th width="15%" bgcolor="#bebebe"><?php echo $this->translate->_("Permission");?></th>
		</tr>
<?php $isColor = 'bg2';
if (count($this->paginator) && !empty($this->paginator)):
foreach($this->paginator as $v)
{
            if ($isColor== 'bg1') {
                    $isColor = 'bg2';
            } else {
                    $isColor = 'bg1';
            }
?>
          <tr class="<?php echo $isColor;?>">
			<td><?php echo $v['PermissionID'];?></td>
                        <td><?php echo $v['Name'];?></td>
                        <td><?php echo $v['PermissionType'];?></td>
                        <td><?php echo $v['Description'];?></td>
			<td><?php echo $v['PermissionKey'];?></td>			
			<td>
                            <?php if($v['GroupID'] != "") {?>
                                    <a href="<?php echo $this->url(array("action" => "active", "gid" => $v['GroupID'], 'pid' => $v['PermissionID'], 'do' => 'remove')); ?>">
                                            <img style="border-width:0px;" title="Deactive" src="<?php echo $this->layoutUrl;?>img/icon_active.png" />
                                    </a>
                            <?php } else { ?>
                                    <a href="<?php echo $this->url(array("action" => "active", "gid" => $this->filter['GroupID'], 'pid' => $v['PermissionID'], 'do' => 'insert') ); ?>">
                                            <img style="border-width:0px;" title="Active" src="<?php echo $this->layoutUrl;?>img/icon_delete.png" />
                                    </a>
                            <?php } ?>
			</td>
		</tr>
	<?php } ?>
	<?php endif; ?>
 </table>
      </div>
<?php echo $this->paginationControl($this->paginator,'Sliding', 'admin_pagination_control.phtml'); ?>
